﻿<?php
	session_start();
	//验证是否是管理员进入
	if($_SESSION["Admin_Id"] != null && $_SESSION["Admin_Id"] != "")
	{}
	else
	{
		echo '<script>alert("请登录！");window.location.href="../admin/index.php"</script>';
	}
	//管理员已经登录，查看毕业生的id是否传过来了
	if($_GET["id_graduate"] != null && $_GET["id_graduate"] != "")
	{
		$id_graduate = (int)$_GET["id_graduate"];
		include("../class/user.class.php");
		$class_user = new User();
		if($class_user->UpdateUser_BeAttest($id_graduate) > 0)
		{
			echo '<script>alert("认证成功！");window.location.href="../admin/manage.php"</script>';
		}
		else
		{
			echo '<script>alert("认证失败！");window.location.href="../admin/manage.php"</script>';
		}
	}
	else
	{
		echo '<script>window.location.href="../admin/manage.php"</script>';
	}
?>